package com.haixiaoke.saas.repository.service.impl;

import com.haixiaoke.saas.repository.mapper.SmartLockMapper;
import com.haixiaoke.saas.repository.pojo.SmartLock;
import com.haixiaoke.saas.repository.service.ISmartLockService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @Author Dell
 * @Date 2023/6/16
 **/
@Service
public class SmartLockServiceImpl implements ISmartLockService {
    @Autowired
    private SmartLockMapper smartLockMapper;

    @Override
    public Map<String, Map<String,Object>> selectBrandIdByHouseId(List<String> houseIds) {
        return smartLockMapper.selectBrandIdByHouseId(houseIds);
    }

    @Override
    public List<SmartLock> selectSmartLockList(SmartLock smartLock) {
        return smartLockMapper.selectSmartLockList(smartLock);
    }

    @Override
    public List<SmartLock> selectBySns(List<String> macList) {
        return smartLockMapper.selectBySns(macList);
    }

    @Override
    public int updateBatchById(List<SmartLock> smartLocks) {
        return smartLockMapper.updateBatchById(smartLocks);
    }

    @Override
    public SmartLock selectBySn(String sn) {
        return smartLockMapper.selectBySn(sn);
    }

    @Override
    public int updateById(SmartLock smartLock) {
        return smartLockMapper.updateById(smartLock);
    }
}
